package net.sdd.school;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate;

@SpringBootApplication
@MapperScan("net.sdd.school.mapper")
@EnableCaching
public class SchoolApplication {
    public static void main(String[] args) {
        SpringApplication.run(SchoolApplication.class);
    }

    // 创建对象，加入容器
    @Bean
    public RestTemplate restTemplate(){
        return new RestTemplate();
    }
}
